﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace PhoneStore.Presentation
{
    /// <summary>
    /// Interaction logic for Welcome.xaml
    /// </summary>
    public partial class Welcome : Window
    {
        public Welcome()
        {
            InitializeComponent();
        }

        private void btnCus_Click(object sender, RoutedEventArgs e)
        {
            ViewScreen f = new ViewScreen();
            f.Show();
            this.Close();
        }

        private void btnStaff_Click(object sender, RoutedEventArgs e)
        {
            Login l = new Login();
            l.ShowDialog();
            if (l.IsOK)
            {
                if (l.user.RoleID == "1")
                {
                    Manage m = new Manage();
                    m.Show();
                }
                else if(l.user.RoleID == "2")
                {
                    SellProduct s = new SellProduct(l.user);
                    s.Show();
                }
                this.Close();
            }
        }
    }
}
